<script type="text/javascript">
	$(document).ready(function(){
		parent.showButton("save,back");
	}); 
	function doButton(btn){
		if(btn == 'save'){
	    	$.post("__URL__/index_act/act/{$act}/", $("#form").serialize(),function(data){
    			eval("var dataJ = " + data);
				if(dataJ.success == 1){
					alert("编辑成功");
					location.href="__URL__/index";
				}else if(dataJ.message != ''){
					alert(dataJ.message);
				}else {
					alert("编辑失败");
				}
    		});
		}else if(btn == "back"){
	        location.href = "__URL__/index/";
		}
	}
</script>
  <div class="content" style="min-height:50px;">
    <form action="__URL__/indact/act/{$act}/" method="post" enctype="multipart/form-data" id="form">
    <input type="hidden" name="act" id="act" value="{$act}" />
    <input type="hidden" name="id" value="{$info.id}" />
      <table class="form">
        <tr>
          <td><span class="required">*</span>姓名：</td>
          <td>
            <eq name="_GET['act']" value="add">
          	  <input type="text" name="name" value="{$info.name}">
          	<else/>
          	  {$info.name}
          	</eq>
          </td>
        </tr>
        <tr>
          <td>性别：</td>
          <php>
          	if($info['sex'] == 1){
          		$sex1 = "checked";
          	}elseif($info['sex'] == 2){
          		$sex2 = "checked";
          	}else{
          		$sex3 = "checked";
          	}
          </php>
          <td><label><input type="radio" name="sex" value="1" {$sex1} />男</label>　　
	          <label><input type="radio" name="sex" value="2" {$sex2} />女</label>　　
	          <label><input type="radio" name="sex" value="０" {$sex3} />保密</label>
          </td>
        </tr>
        <tr>
          <td><span class="required">*</span>手机号：</td>
          <td>
          	  <input type="text" name="mobile" value="{$info.mobile}">
          </td>
        </tr>
        <tr>
          <td>部门/单位：</td>
          <td>
            <select name="branch_id">
          	  <option value="">请选择</option>
          	  <volist name="Branch" id="val">
          	    <option value="{$val.id}" <eq name="val.id" value="$info.branch_id">selected</eq>>{$val.name}</option>
          	  </volist>
          	</select>
          </td>
        </tr>
        <tr>
          <td>权限组：</td>
          <td>
            <select name="group_id">
          	  <option value="">请选择</option>
          	  <volist name="Group" id="val">
          	    <option value="{$val.id}" <eq name="val.id" value="$info.group_id">selected</eq> >{$val.name}</option>
          	  </volist>
          	</select>
          </td>
        </tr>
        <tr>
          <td><span class="required">*</span>卡号：</td>
          <td>
          	  <input type="text" name="card" value="{$info.card}">《请将上面信息填写完整后刷卡提交》
          </td>
        </tr>
      </table>
    </form>
  </div>